﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ADList.aspx.cs" Inherits="ADList" EnableEventValidation="false" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html>
<html>
<head>

   <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>50CMS后台框架</title>
    <link rel="shortcut icon" href="favicon.ico">
     <link href="../css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="../css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="../css/animate.css" rel="stylesheet">
    <link href="../css/style.css?v=4.1.0" rel="stylesheet">
    <link href="../css/plugins/footable/footable.core.css" rel="stylesheet" />


        <link href="../50/style.css" rel="stylesheet" />
</head>

<body class="gray-bg">
<form id="form1" runat="server" class="form-horizontal">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>
                            广告管理</h5>
                        
                   
                        <div class="ibox-tools">
                            <a href="ADList.aspx" class="btn btn-primary btn-xs"><i class="fa fa-refresh"> &nbsp;&nbsp; 刷 新</i></a>
                            <a href="#" id="Add" class="btn btn-primary btn-xs"><i class="fa fa-plus"></i>&nbsp;&nbsp; 新增</a>

                      </div>
                    </div>
                    <div class="ibox-content">


    <asp:Repeater ID="rptList" runat="server" onitemcommand="rptList_ItemCommand">
    <HeaderTemplate>
    <table class="footable table table-stripped toggle-arrow-tiny">
      <tr>
        <th >选择</th>
        
        <th >广告标题</th>
   
        <th >发布时间</th>
        <th >属性</th>
        <th>操作</th>
      </tr>
      </HeaderTemplate>
      <ItemTemplate>
      <tr>
        <td align="center"><asp:CheckBox ID="cb_id" CssClass="checkall" runat="server" Text='<%#Eval("NId")%>' /></td>
        
        <td><%#Eval("Title")%></td>
                  <td><img src=<%#Eval("Img")%> height="40px" /></td>


        <td><%#string.Format("{0:g}", Eval("Time"))%></td>

                         
             <td>                                                                                     
           
          <asp:LinkButton ID="LinkButton2" CommandName="ibtnTop" CommandArgument='<%#Eval("NId")%>' runat="server" ToolTip='<%# Convert.ToBoolean(Eval("IsSlide"))? "设置置顶" : "取消置顶"%>'><%# Convert.ToBoolean(Eval("IsTop"))? "<span class='btn btn-warning btn-xs'><i class='fa fa-arrow-circle-up'></i> 顶</span>" : "<span class='btn btn-default btn-xs'><i class='fa fa-arrow-circle-up'></i> 顶</span>"%></asp:LinkButton>
          <asp:LinkButton ID="LinkButton3" CommandName="ibtnRed" CommandArgument='<%#Eval("NId")%>'  runat="server" ToolTip='<%# Convert.ToBoolean(Eval("IsRed"))? "取消推荐" : "设置推荐"%>'><%# Convert.ToBoolean(Eval("IsRed"))? "<span class='btn btn-warning btn-xs'><i class='fa fa-star'></i> 荐</span>" : "<span class='btn btn-default btn-xs'><i class='fa fa-star'></i> 荐</span>"%></asp:LinkButton>
          <asp:LinkButton ID="LinkButton4" CommandName="ibtnHot" CommandArgument='<%#Eval("NId")%>'  runat="server"  ToolTip='<%# Convert.ToBoolean(Eval("IsHot"))? "取消热门" : "设置热门"%>' ><%# Convert.ToBoolean(Eval("IsHot"))? "<span class='btn btn-warning btn-xs'><i class='fa fa-fire'></i> 热</span>" : "<span class='btn btn-default btn-xs'><i class='fa fa-fire'></i> 热</span>"%></asp:LinkButton>
          <asp:LinkButton ID="LinkButton5" CommandName="ibtnSlide" CommandArgument='<%#Eval("NId")%>'  runat="server"   ToolTip='<%# Convert.ToBoolean(Eval("IsSlide"))? "设置图片" : "取消图片"%>'><%# Convert.ToInt32(Eval("IsSlide")) == 1 ? "<span class='btn btn-warning btn-xs'><i class='fa fa-image'></i> 图</span>" : "<span class='btn btn-default btn-xs'><i class='fa fa-image'></i> 图</span>"%></asp:LinkButton>
     
        
        </td>



        <td align="center"><span><a href="add.aspx?id=<%#Eval("NID") %>">修改</a> &nbsp;</span>
      <asp:LinkButton ID="LinkButton6" CommandName="ibtnLock" runat="server"  CommandArgument='<%#Eval("NId")%>'><%# Convert.ToBoolean(Eval("IsLock"))? "<span class='btn btn-danger btn-xs'><i class=fa fa-lock></i>锁定</span>" : "<span class='btn btn-info btn-xs'><i class='fa fa-check'></i>正常</span>"%></asp:LinkButton> &nbsp;
           <asp:LinkButton ID="LinkButton1" runat="server" CommandName="del" CommandArgument='<%#Eval("NId")%>' >删除</asp:LinkButton>

		
        
        </td>
      </tr>
      </ItemTemplate>
      <FooterTemplate>
      </table>
      </FooterTemplate>
      </asp:Repeater>               

 <webdiyer:AspNetPager ID="AspNetPager1"  runat="server"  PageSize="20"  FirstPageText="首页"  LastPageText="末页" NextPageText="下一页" PrevPageText="上一页" AlwaysShow="true"  onpagechanging="AspNetPager1_PageChanging" CssClass="paginator"   CurrentPageButtonClass="cpb">

         </webdiyer:AspNetPager>
     
                           </div>
                </div>
            </div>
        </div>
    </div>
    </form>



      <!-- 全局js -->
    <script src="../js/jquery.min.js?v=2.1.4"></script>
    <script src="../js/bootstrap.min.js?v=3.3.6"></script>

      <!-- 自定js -->

    <script src="../js/plugins/footable/footable.all.min.js" type="text/javascript"></script>
    <script src="../js/content.js" type="text/javascript"></script>
    <script type="text/javascript" src="../js/layer/layer.js"></script>

    <script type="text/javascript">
        $(document).ready(function () { $(".footable").footable(); });
    </script>
    <script type="text/javascript">
 

        $(function () {
            $("#Add").click(function () {

                layer.open({
                    type: 2,
                    title: '添加广告',
                    shadeClose: true,
                    shade: 0.8,
                    area: ['90%', '90%'],
                    content: 'ADAdd.aspx',  //iframe的url
                    end: function () {

                        location.reload();

                    }
                });

            });

        });

        function EditTag(ID)
       {
           layer.open({
               type: 2,
               title: '修改广告',
               shadeClose: true,
               shade: 0.8,
               area: ['90%', '80%'],
               content: 'ADAdd.aspx?id=' + ID,  //iframe的url
               end: function () {

                   location.reload();

               }
           });
       }

    </script>
 
</body>
</html>